import http from "@/api";

import { ResPage } from "@/api/interface";

import { ShareConfigEntity, ShareConfigVo } from "@/biz/interface/SysType";

import { ModuleMainUrl } from "..";

const moduleUrl = ModuleMainUrl;

// * 获取列表
export const getShareConfigVoListApi = (params: {}) => {
  return http.post<ResPage<ShareConfigVo>>(moduleUrl + `/sysmpshare/mpsharevolist`, params);
};

// * 新增接口
export const saveShareConfigApi = (config: ShareConfigEntity) => {
  return http.post(moduleUrl + `/sysmpshare/mpsharesave`, config);
};

// * 详情接口
export const getShareConfigApi = (params: { id: string }) => {
  return http.post<ShareConfigEntity>(moduleUrl + `/sysmpshare/mpshareinfo`, params);
};

// * 删除接口
export const deleteShareConfigApi = (params: { id: string }) => {
  return http.post(moduleUrl + `/sysmpshare/mpsharedelete`, params);
};

// * 修改状态接口
export const changeFlagActiveApi = (params: { id: string }) => {
  return http.post(moduleUrl + `/sysmpshare/mpshareactive`, params);
};
